package com.iss.demo.service;

import com.iss.demo.dao.sixCourseDao;
import com.iss.demo.entity.sixCourse;
import com.iss.demo.entity.sixCourse;
import com.iss.demo.model.sixCourseModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class sixCourseService {
    @Autowired
    private sixCourseDao dao;

    public List<sixCourseModel> selectAll(){
        List<sixCourseModel> list = new ArrayList<>();
        list = dao.selectAll();
        return list;
    }

    public Integer delete(Integer s_ids[]){
        return dao.delete(s_ids);
    }

    public sixCourse selectById(Integer id){return dao.selectByid(id);}
    public Integer insertCourse(sixCourse sixcourse){
        return dao.insertCourse(sixcourse);
    }
    public Integer updateCourse(sixCourse sixcourse){
        return dao.updateCourse(sixcourse);
    }

    public Integer updatesixCourseInfo(String surface,String info ,Integer id){
        return dao.updateInfo(surface,info,id);
    }
}
